#ifndef _MAT_LEVELDATA_H_
#define _MAT_LEVELDATA_H_

#include "mat_define.h"
#include "mat_logicboard.h"

#include "script/state_holder.h"

struct	MATLevelData
{

	int					Index;
	GAME_TYPE			m_GameType;
	int					Score[3];	
	int					Move;
	int					Time;
	int					Gem1Count;
	int					Gem2Count;
	int					GemTypeCountInGame;
	bool				m_ToSpawnMoreBomb;

	static GAME_TYPE	MapNameToGameType(const std::string& TypeName);
	static std::string	MapGameTypeToName(GAME_TYPE	Type);


};

class	MATLevelDataSet : public script::StateHolder
{
public:
	static MATLevelDataSet& Instance();
	MATLevelData*			GetLevel(const std::string& Name) { return m_LevelData.GetElement(Name); };
	MATLevelData*			GetLevelIdx(int Idx) { return m_LevelData.GetElementByIndex(Idx); };
	int						GetCount() { return m_LevelData.GetElementC(); };
	void					Reload();

protected:
	MATLevelDataSet();
	num::NamedSet<MATLevelData*>		m_LevelData;
};


#endif // _MAT_LEVELDATA_H_